package com.xueyi.aixihu.reqeust;

import com.xueyi.aixihu.exception.SzException;
import com.xueyi.aixihu.reqeust.base.PageLimitReq;
import com.xueyi.aixihu.status.SystemCode;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.CollectionUtils;

import java.util.Collections;
import java.util.List;


/**
 * @authoer:hxs
 * @createDate:2022/8/16
 * @description: 文章列表查询条件
 */
@Data
public class ChangeClassifyReq extends PageLimitReq {
    /**
     * 一级菜单id
     */
    private Integer oneClassifyId;

    /**
     * 二级菜单id
     */
    private Integer twoClassifyId;

    /**
     * 三级菜单id
     */
    private Integer threeClassifyId;

    private Integer fourClassifyId;


    private String title;

    private Integer auditStatus;

    private Integer type;

    //用于替换上面的type
    private Integer contentType;

    private List<Integer> systemTypeId;

    private Integer userId;
    private Integer roleId;

    public void format() {
        this.title = StringUtils.isBlank(this.title) ? null : this.title.trim();
        this.systemTypeId = CollectionUtils.isEmpty(systemTypeId) ? null : systemTypeId;
    }
}
